
import axios from "axios";

const service = axios.create({
    baseURL:import.meta.env.VITE_ADMIN_BASE_URL,
    timeout:20000
})

service.interceptors.request.use(config=>{

    const token = sessionStorage.getItem("token");
    if(token){
        config.headers.token = token;
    }
    return config
});

service.interceptors.response.use(res=>{

    return res;
})

export default service;